function Hover(){
var navItens = document.getElementById("nav").getElementsByTagName("li");
 for(var i=0; i<navItens.length; i++)
 {
 	if (navItens[i].className == "submenu"){
		navItens[i].onmouseover= function(){
			this.className+= " over";
			
		}
		navItens[i].onmouseout= function(){
			this.className= "submenu";
			//this.className = this.className.replace(new RegExp(" over\\b"), "submenu");
		}
	}
 }

}
window.onload=Hover;
if (window.attachEvent) window.attachEvent("onload", Hover);